package my.study.designpattern.builder;

public class Main {

	/**
	 * 建造模式可以将一个产品的内部表象和产品的生成过程分离开来，
	 * 从而使得一个建造过程可以生产不同内部表象的产品对象
	 */
	public static void main(String[] args) {
		BikeBuilder doubleTyreBuilder = new DoubleTyreBuilder();
		Director doubleTyreDirector = new Director(doubleTyreBuilder);
		doubleTyreDirector.construct();
		Bike b1 = doubleTyreBuilder.getBike();
		b1.run();
		
		SingleTyreBuilder singleTyreBuilder = new SingleTyreBuilder();
		Director singleTyreDirector = new Director(singleTyreBuilder);
		singleTyreDirector.construct();
		Bike b2 = singleTyreBuilder.getBike();
		b2.run();
	}

}
